<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CqCore: CqSqlite类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CqCore
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="class_cq_sqlite-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CqSqlite类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>数据存储类  
 <a href="class_cq_sqlite.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a70ab8f02795bb5614a7ace2f025b82e3"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3">Result</a> { <a class="el" href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3a43ca9638c7f623ed2528d36c96e36d74">NoChange</a>, 
<a class="el" href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3a85b04a2447dd99c31cc277ef85d8b754">Done</a>, 
<a class="el" href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3a069572925efb87950131dfc106cf07cc">SqlError</a>
 }<tr class="memdesc:a70ab8f02795bb5614a7ace2f025b82e3"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_cq_sqlite.html" title="数据存储类 ">CqSqlite</a> 执行结果  <a href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3">更多...</a><br /></td></tr>
</td></tr>
<tr class="separator:a70ab8f02795bb5614a7ace2f025b82e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a924d6905a7519fa2908292580ae58e01"><td class="memItemLeft" align="right" valign="top"><a id="a924d6905a7519fa2908292580ae58e01"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a924d6905a7519fa2908292580ae58e01">~CqSqlite</a> ()</td></tr>
<tr class="memdesc:a924d6905a7519fa2908292580ae58e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">析构函数 <br /></td></tr>
<tr class="separator:a924d6905a7519fa2908292580ae58e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a9d1a5fcd72f176999645b772f53540d6"><td class="memItemLeft" align="right" valign="top"><a id="a9d1a5fcd72f176999645b772f53540d6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a9d1a5fcd72f176999645b772f53540d6">CqSqlite</a> (CqSqlitePrivate &amp;dd, QObject *parent=Q_NULLPTR)</td></tr>
<tr class="memdesc:a9d1a5fcd72f176999645b772f53540d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造函数 <br /></td></tr>
<tr class="separator:a9d1a5fcd72f176999645b772f53540d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b4d2a9088750dc6741511604bc4aea4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a7b4d2a9088750dc6741511604bc4aea4">setFileName</a> (const QString &amp;fileName)</td></tr>
<tr class="memdesc:a7b4d2a9088750dc6741511604bc4aea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置文件名  <a href="#a7b4d2a9088750dc6741511604bc4aea4">更多...</a><br /></td></tr>
<tr class="separator:a7b4d2a9088750dc6741511604bc4aea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8dedf419ae7730d0bfcdacee712b48f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#ad8dedf419ae7730d0bfcdacee712b48f">prepare</a> (const QString &amp;s)</td></tr>
<tr class="memdesc:ad8dedf419ae7730d0bfcdacee712b48f"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置预处理  <a href="#ad8dedf419ae7730d0bfcdacee712b48f">更多...</a><br /></td></tr>
<tr class="separator:ad8dedf419ae7730d0bfcdacee712b48f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a222a6b10184a46c14db7d2c5d9534c75"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a222a6b10184a46c14db7d2c5d9534c75">openDatabase</a> ()</td></tr>
<tr class="memdesc:a222a6b10184a46c14db7d2c5d9534c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">打开数据库  <a href="#a222a6b10184a46c14db7d2c5d9534c75">更多...</a><br /></td></tr>
<tr class="separator:a222a6b10184a46c14db7d2c5d9534c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9faa5ecdbf8947000244b94fdfde2646"><td class="memItemLeft" align="right" valign="top">QSqlQuery&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a9faa5ecdbf8947000244b94fdfde2646">query</a> (const QString &amp;sql)</td></tr>
<tr class="memdesc:a9faa5ecdbf8947000244b94fdfde2646"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行 Sql 语句  <a href="#a9faa5ecdbf8947000244b94fdfde2646">更多...</a><br /></td></tr>
<tr class="separator:a9faa5ecdbf8947000244b94fdfde2646"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a540b1af2c7e27405687e4f93ea032205"><td class="memItemLeft" align="right" valign="top">QSqlQuery&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_cq_sqlite.html#a540b1af2c7e27405687e4f93ea032205">query</a> (const char *srcSql)</td></tr>
<tr class="memdesc:a540b1af2c7e27405687e4f93ea032205"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行 Sql 语句  <a href="#a540b1af2c7e27405687e4f93ea032205">更多...</a><br /></td></tr>
<tr class="separator:a540b1af2c7e27405687e4f93ea032205"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>数据存储类 </p>
</div>
<p>继承自 QObject .</p>
<h2 class="groupheader">成员枚举类型说明</h2>
<a id="a70ab8f02795bb5614a7ace2f025b82e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70ab8f02795bb5614a7ace2f025b82e3">&#9670;&nbsp;</a></span>Result</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_cq_sqlite.html#a70ab8f02795bb5614a7ace2f025b82e3">CqSqlite::Result</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><a class="el" href="class_cq_sqlite.html" title="数据存储类 ">CqSqlite</a> 执行结果 </p>
<p>酷Q API 密切相关的执行函数都会返回此枚举作为结果表达。 </p>
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a70ab8f02795bb5614a7ace2f025b82e3a43ca9638c7f623ed2528d36c96e36d74"></a>NoChange&#160;</td><td class="fielddoc"><p>没有发生改变 </p>
<p>如果数据库内容没有发生变化，返回此枚举值。 </p>
</td></tr>
<tr><td class="fieldname"><a id="a70ab8f02795bb5614a7ace2f025b82e3a85b04a2447dd99c31cc277ef85d8b754"></a>Done&#160;</td><td class="fielddoc"><p>已经完成 </p>
<p>如果数据库操作执行成功，返回此枚举值。 </p>
</td></tr>
<tr><td class="fieldname"><a id="a70ab8f02795bb5614a7ace2f025b82e3a069572925efb87950131dfc106cf07cc"></a>SqlError&#160;</td><td class="fielddoc"><p>数据库错误 </p>
<p>如果数据库操作执行失败，返回此枚举值。更多信息可以看酷Q的日志。 </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a222a6b10184a46c14db7d2c5d9534c75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a222a6b10184a46c14db7d2c5d9534c75">&#9670;&nbsp;</a></span>openDatabase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CqSqlite::openDatabase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>打开数据库 </p>
<p>此方法将打开数据库文件，如果成功返回 true；否则返回 false。 </p>

</div>
</div>
<a id="ad8dedf419ae7730d0bfcdacee712b48f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8dedf419ae7730d0bfcdacee712b48f">&#9670;&nbsp;</a></span>prepare()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CqSqlite::prepare </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置预处理 </p>
<p>添加预处理命令。每次文件加载后都将执行 <em>s</em> 语句。可以添加多条语句。 </p>

</div>
</div>
<a id="a9faa5ecdbf8947000244b94fdfde2646"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9faa5ecdbf8947000244b94fdfde2646">&#9670;&nbsp;</a></span>query() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QSqlQuery CqSqlite::query </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>sql</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>执行 Sql 语句 </p>
<p>此方法将创建一个 QSqlQuery 并返回该对象，该对象将执行 <em>sql</em> 语句。 </p>

</div>
</div>
<a id="a540b1af2c7e27405687e4f93ea032205"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a540b1af2c7e27405687e4f93ea032205">&#9670;&nbsp;</a></span>query() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QSqlQuery CqSqlite::query </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>srcSql</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>执行 Sql 语句 </p>
<p>此方法将创建一个 QSqlQuery 并返回该对象，该对象将执行 UTF-8 编码的 <em>srcSql</em> 语句。 </p>

</div>
</div>
<a id="a7b4d2a9088750dc6741511604bc4aea4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b4d2a9088750dc6741511604bc4aea4">&#9670;&nbsp;</a></span>setFileName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CqSqlite::setFileName </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>fileName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>设置文件名 </p>
<p>这里的文件名 <em>fileName</em> 不包含路径，只有文件名和扩展名；文件位置在插件目录内。 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/Users/Monster/Documents/GitHub/qtassistant/cqcore/<a class="el" href="cqsqlite_8h_source.html">cqsqlite.h</a></li>
<li>C:/Users/Monster/Documents/GitHub/qtassistant/cqcore/cqsqlite.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
